﻿package Network
{
	import Network.DataMessage;
	
	import flash.events.Event;
		
	public class TCPMessageEvent extends Event
	{
		private var FMessage:DataMessage;
		
		public function TCPMessageEvent(AMessage:DataMessage):void
		{			
			FMessage = AMessage;			
			super(String(TCPConstants.Events[FMessage.DataType]));
		}
		
		public function get Message():DataMessage
		{
			return FMessage;
		}		
				
		public function set Message(AMessage:DataMessage):void
		{
			FMessage = AMessage;
		}
	}	
}
